package com.tech.cloud.apis.fallback;

import com.tech.cloud.apis.PayFeignApi;
import com.tech.cloud.dto.PayDTO;
import com.tech.cloud.resp.ResultData;
import com.tech.cloud.resp.ReturnCodeEnum;
import org.springframework.stereotype.Component;

@Component
public class PayFeignApiFallBack implements PayFeignApi {

    @Override
    public ResultData addPay(PayDTO payDTO) {
        return  ResultData.fail(ReturnCodeEnum.RC500.getCode(), "请稍后再试，服务降级");
    }

    @Override
    public ResultData getPayInfo(Integer id) {
        return ResultData.fail(ReturnCodeEnum.RC500.getCode(), "请稍后再试，服务降级");
    }
}
